module.exports = {
	mode: 'development',
	//两个包
	entry: {
		main1: "./src/main1.js",
		main2: "./src/main2.js",
	},
	optimization: {
        splitChunks: {
            minSize: 0,//提取出的chunk的最小大小
            cacheGroups: {
                commons: {
                    name: 'myCommons',//公共js模块名称
                    chunks: 'all',//指定提取范围
                    //chunks: 'initial',//指定提取范围
                    minChunks: 2,//重复两次之后就提取出来
                }
            }
        }
    }
};